package com.zjxf.service;

import com.alibaba.fastjson.JSONObject;
import com.zjxf.base.bean.po.CmsStory;
import com.zjxf.base.bean.ro.RoCmsStory;
import com.zjxf.base.bean.vo.VoCmsStory;
import com.zjxf.base.common.OperationException;
import org.springframework.data.domain.Page;

/**
 * 长征故事
 *
 * @author ZhangWei
 * @date 2021/4/6/006 19:11
 */
public interface CmsStoryService {

    /**
     * 添加或修改
     *
     * @param vo
     */
    void addOrUpdate(VoCmsStory.addOrUpdate vo);

    /**
     * 删除
     *
     * @param id
     */
    void delete(Long id) throws OperationException;

    /**
     * 回显
     *
     * @param id
     * @return
     */
    CmsStory getEntity(Long id) throws OperationException;

    /**
     * ro回显
     *
     * @param cmsStory
     * @return
     */
    RoCmsStory.Details getEntityRo(CmsStory cmsStory);

    /**
     * 分页
     *
     * @param filter
     * @return
     */
    Page<CmsStory> page(VoCmsStory.filter filter);

    /**
     * ro分页
     *
     * @param page
     * @return
     */
    JSONObject pageRo(Page<CmsStory> page);

}
